import {
	getCustomNav
} from '@/util/util.js'
import {
	getStorage
} from '@/util/auth.js';
export default {
	methods: {
		navigate(url) {
			if (url) {
				uni.navigateTo({
					url
				});
			}
		},
		back() {
			uni.navigateBack({
				fail() {
					uni.redirectTo({
						url: '/pages/index/index'
					})
				}
			})
		},
		call(phone) {
			uni.makePhoneCall({
				phoneNumber: phone
			})
		},
		openLocation(latitude, longitude, title) {
			uni.openLocation({
				latitude: latitude,
				longitude: longitude,
				name: title
			});
		}
	},
	computed: {
		mt() {
			let custom = getCustomNav();
			return custom.statusBar + custom.nvaMartom + custom.navHeight + 20 + 'rpx';
		},
		showLoading() {
			return this.$store.getters.showLoading
		}
	},
	data() {
		return {
			cloudStorage: 'https://inner-img.yifanhuiju.cn/',
			// cloudStorage: 'http://192.168.0.137:8100/shopAlliance',
		}
	},

}
